The OTData Structure
You use theOTData
structure to specify the location and size of noncontiguous data. You can use this structure in place of the normalTNetbuf
structure to describe a data buffer when sending data using theOTSndUData
function (page 3-101), theOTSndURequest
function (page 3-107), theOTSndUReply
function (page 3-112), theOTSnd
function (page 3-130),
theOTSndRequest
function (page 3-137), and theOTSndReply
function (page 3-141).
When transferring data, you normally specify a pointer to a
- WARNING
- The
OTData
structure is an Apple extension to the XTI specification. Using it might cause your program not to work when ported to other XTI/STREAMS environments.![]()
TNetbuf
structure that specifies the location and size of the buffer containing the data. However, you cannot use aTNetbuf
structure to describe data that is noncontiguous. Instead you must use anOTData
structure to describe each separate chunk of data. When the function that sends the data executes, it is able to locate all
the chunks of data, given a pointer to theOTData
structure that describes the first chunk.Using the
OTData
structure enables you to send data that is not contiguous, but the total size of the data fragments must not exceed the maximum size of data that the endpoint can send. The limits for normal and expedited data are specified in thetsdu
andetsdu
fields of theTEndpointInfo
structure for the endpoint.Each
OTData
structure specifies the location of a data fragment, the size of the fragment, and the location of theOTData
structure that specifies the location and size of the next data fragment. The data information structure is defined by theOTData
type.
struct OTData { void* fNext; void* fData; size_t fLen; }; typedef struct OTData OTData;
Field Description
fNext
- A pointer to the
OTData
structure that describes the next data fragment. Specify aNULL
pointer for the last data fragment.fData
- A pointer to the data fragment.
fLen
- A long specifying the size of the fragment in bytes.